.PHONY:all
all:server_netcal client_netcal

server_netcal:main.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp

client_netcal:TcpClient.cc
	g++ -o $@ $^ -std=c++17 -ljsoncpp


.PHONY:output
output:
	@mkdir output
	@mkdir output/bin
	@mkdir output/conf
	@mkdir output/log
	@cp server_netcal output/bin
	@cp client_netcal output/bin
	@cp test.conf output/conf
	@tar czf output.tgz output

.PHONY:clean
clean:
	rm -rf server_netcal client_netcal output output.tgz